#include "sktsetstyle.h"

SktSetStyle::SktSetStyle()
{

}

void SktSetStyle::SktSetBtnStyle(QPushButton *pBtn,QString n,QString h,QString p){
    QString strBtnStyle ="QPushButton{border-image:url("+n+");}";
    strBtnStyle +="QPushButton:hover{border-image:url("+h+");}";
     strBtnStyle +="QPushButton:pressed{border-image:url("+p+");}";

     pBtn->setStyleSheet(strBtnStyle);

}


bool SktSetStyle::SktLoadQssFile(const QString qssFile){
    QFile qss(qssFile);
    bool bRet = qss.open(QFile::ReadOnly);
    if(false==bRet){
        return bRet;
    }

    qApp->setStyleSheet(qss.readAll());
    qss.close();
    return true;


}
